package dk.simonvogensen.itodo.client;

import dk.simonvogensen.itodo.client.backend.AppEngineBackend;
import dk.simonvogensen.itodo.client.backend.Backend;
import dk.simonvogensen.itodo.client.controller.Controller;
import dk.simonvogensen.itodo.client.view.View;

/**
 * @author $LastChangedBy: vogensen@gmail.com $
 * @version $Revision: 18 $
 */
public class ApplicationLoader {
    public View build(boolean gearsInstalled) {
        View view = new View();
        GWTUtils gwtUtils = new GWTUtils();
        Backend backend;
//        if(gearsInstalled)
//            backend = new GearsEnabledAppEngineBackend(view, gwtUtils);
//        else
            backend = new AppEngineBackend(view, gwtUtils);
        new Controller(view, backend, gwtUtils);
        return view;
    }
}
